package models

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(50)"`
	Password string `gorm:"type:varchar(50)"`
}

type Node struct {
	gorm.Model
	NodeName string `gorm:"type:varchar(50)"`
}

type Role struct {
	gorm.Model
	RoleName string `gorm:"type:varchar(50)"`
}

type UserRole struct {
	gorm.Model
	Uid int `gorm:"type:int"`
	Rid int `gorm:"type:int"`
}

type RoleNode struct {
	gorm.Model
	Rid int `gorm:"type:int"`
	Nid int `gorm:"type:int"`
}

type Delivery struct {
	gorm.Model
	DeliveryNo    string `gorm:"type:varchar(50)"` //配送员编码
	DeliveryName  string `gorm:"type:varchar(50)"` //配送员名称
	DeliveryPhone string `gorm:"type:varchar(50)"` //配送员外卖
}

type Order struct {
	gorm.Model
	OrderNo   string `gorm:"type:varchar(50)"` //订单编码
	OrderForm string `gorm:"type:varchar(50)"` //配送地址
	OrderName string `gorm:"type:varchar(50)"` //客户信息
	Did       int    `gorm:"type:int"`
}

type DeliveryOrderList struct {
	OrderId       int    `gorm:"type:int"`
	DeliveryNo    string `gorm:"type:varchar(50)"` //配送员编码
	DeliveryName  string `gorm:"type:varchar(50)"` //配送员名称
	DeliveryPhone string `gorm:"type:varchar(50)"` //配送员外卖
	OrderNo       string `gorm:"type:varchar(50)"` //订单编码
	OrderForm     string `gorm:"type:varchar(50)"` //配送地址
	OrderName     string `gorm:"type:varchar(50)"` //客户信息
}

//////////车辆订单表

type Car struct {
	gorm.Model
	CarNo   string `gorm:"type:varchar(50)"` //车辆编码
	CarName string `gorm:"type:varchar(50)"` //车辆名称
	CarNum  string `gorm:"type:varchar(50)"` //车牌号
}

type Ord struct {
	gorm.Model
	OrdNo   string `gorm:"type:varchar(50)"` //订单编码
	OrdForm string `gorm:"type:varchar(50)"` //发货信息
	OrdTo   string `gorm:"type:varchar(50)"` //收货信息
	Cid     int    `gorm:"type:int"`
}

type CarOrdList struct {
	OrdId   int    `gorm:"type:int"`
	CarNo   string `gorm:"type:varchar(50)"` //车辆编码
	CarName string `gorm:"type:varchar(50)"` //车辆名称
	CarNum  string `gorm:"type:varchar(50)"` //车牌号
	OrdNo   string `gorm:"type:varchar(50)"` //订单编码
	OrdForm string `gorm:"type:varchar(50)"` //发货信息
	OrdTo   string `gorm:"type:varchar(50)"` //收货信息
}
